//
//  CXOUtModel.m
//  GiftThat
//
//  Created by ChuXiang on 16/1/9.
//  Copyright © 2016年 ChuXiang. All rights reserved.
//

#import "CXOUtModel.h"

@implementation CXOUtModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    [super setValue:value forUndefinedKey:key];
    if ([key isEqualToString:@"subcategories"]) {
        NSArray *array = value;
        NSMutableArray *mutbleArray = [NSMutableArray arrayWithCapacity:0];
        for (NSDictionary *dic in array) {
            CXGiftModel *model = [[CXGiftModel alloc]initWithDictionary:dic];
            [mutbleArray addObject:model];
        }
        self.subcategorie = [[NSMutableArray alloc]initWithArray:mutbleArray];
    }
}
@end
